/**
 * @author mili
 */
var incidentFiles;

// call function to get the object array of json file names
function getTimeStamp(){
	var ret = (function(){
		var obj = null;
		$.ajax({
			'async':false,
			'global':false,
			'url':server_url+"?type=incidents&flag=no-debug",
			'success':function(data){
				obj = data;
			}
		});
		return obj;
	})();
	var incidentFiles = JSON.parse(ret);
	
	for(var i = 0; i < 10; i++){
		document.timestamp.timeline.options[i] = new Option( incidentFiles[i],"timestamp1", false, false);
	}
}

// call to get the start time of this file from server
function getStartTime(file){
	var ret = (function(){
		var obj = null;
		$.ajax({
			'async':false,
			'global':false,
			'url':server_url+"?type=getStartTime&flag=no-debug&file="+file,
			'success':function(data){
				obj = data;
			}
		});
		return obj;
	})();
	return ret;
}
